package com.jadeen.enums;

import lombok.Getter;

/**
 * @author Jadeen
 * @date  2025/8/21
 **/
@Getter
public enum CommentTypeEnum {

    PRIMARY(0L,"顶级评论"),
    SECOND(1L,"二级评论");

    public Long code;

    public String desc;

    CommentTypeEnum(Long code, String desc){
        this.code = code;
        this.desc = desc;
    }

    public static CommentTypeEnum getByCode(int codeVal){
        for(CommentTypeEnum resultCodeEnum : CommentTypeEnum.values()){
            if(resultCodeEnum.code == codeVal){
                return resultCodeEnum;
            }
        }
        return null;
    }

}
